-
-
Notifications
You must be signed in to change notification settings - Fork 76
feat(shortcuts): Port to libadwaita 1.8 #453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR migrates the keyboard shortcuts dialog from a custom Gtk.ShortcutsWindow implementation to libadwaita 1.8's Adw.ShortcutsDialog. The migration involves removing the custom Python class and UI blueprint files, and replacing them with a simpler blueprint definition that is loaded dynamically when needed.
Changes:
- Replaced custom
DialectShortcutsWindowwithAdw.ShortcutsDialogloaded from resources - Moved shortcuts action from window-level to application-level (
win.show-help-overlay→app.shortcuts) - Added dynamic insertion of the "Translate" shortcut when live translation is disabled
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| dialect/window.py | Removed import and initialization of custom shortcuts window |
| dialect/window.blp | Changed menu action from win.show-help-overlay to app.shortcuts; added formatting improvements |
| dialect/shortcuts.py | Deleted custom shortcuts window implementation |
| dialect/shortcuts.blp | Deleted old blueprint definition for custom shortcuts window |
| dialect/shortcuts-dialog.blp | Added new blueprint definition using Adw.ShortcutsDialog and Adw.ShortcutsItem |
| dialect/main.py | Added shortcuts action handler that loads dialog from resources and dynamically adds translate shortcut |
| dialect/meson.build | Updated blueprint file reference from shortcuts.blp to shortcuts-dialog.blp |
| dialect/dialect.gresource.xml | Updated resource reference and applied consistent formatting to file entries |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 8 out of 9 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
If I'm being honest, I don't quite like that Adw.ShortcutsDialog and related classes are so inflexible... I could only "add" the Translate shortcut item. But that means it's always at the end of the list.